<?php
require_once('config.php');
require_once('include/function.php');
require_once("include/smarty/Smarty.class.php");

// memcache_init();
// 使用 MC Wrapper
$templates_c = "saemc://templates_c";
$cache = "saemc://cache";
mkdir($templates_c);
mkdir($cache);

$clean = array();

$smarty = new Smarty();
$smarty->compile_dir = $templates_c;
$smarty->cache_dir = $cache;
$smarty->compile_locking = false;

$smarty->assign("login", isset($_SESSION['user']));
$smarty->assign("uid", $_SESSION['user']['id']);
$smarty->assign("username", $_SESSION['user']['username']);
?>